package com.example.administrator.printoutindemo.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.example.administrator.printoutindemo.mvp.contract.ShengChanDiaoDuContract;
import com.example.administrator.printoutindemo.mvp.model.ShengChanDiaoDuModel;


@Module
public class ShengChanDiaoDuModule {
    private ShengChanDiaoDuContract.View view;

    /**
     * 构建ShengChanDiaoDuModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public ShengChanDiaoDuModule(ShengChanDiaoDuContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    ShengChanDiaoDuContract.View provideShengChanDiaoDuView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    ShengChanDiaoDuContract.Model provideShengChanDiaoDuModel(ShengChanDiaoDuModel model) {
        return model;
    }
}